#ifndef _VECTOR_H_
#define _VECTOR_H_

#include "stdafx.h"

namespace aiRobots
{	
	#define VSIZE 4
	typedef float vtype;

	class Vector
	{
	private:
		int Length;
		vtype Value[VSIZE];

	protected:

	public:
		Vector();
		Vector(int length);
		Vector(int length, vtype value);
		Vector(int length, vtype* value);

		void Renew(int length);
		void Renew(int length, vtype value);
		void Renew(int length, vtype* value);
		void SetValue(vtype value);
		void SetValue(int index, vtype value);
		void SetValue(vtype* value);
		void GetValue(vtype* value);
		vtype GetValue(int index);

		void Normalize();
		vtype Norm();
		vtype AngleBetween(Vector &v);
		vtype Dot(const Vector &v);
		Vector Cross(const Vector &v);
		vtype ProjectOnto(Vector &v);

		void Print();

		Vector operator=(const Vector &v);
		Vector operator+(const Vector &v);
		Vector operator-(const Vector &v);
		Vector operator*(vtype a);
		Vector operator/(vtype a);
	};
}

#endif